Optimal. Leaf size=27 \[ \frac {\log (\sin (a+b x))}{b}-\frac {\sin ^2(a+b x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2590, 14} \[ \frac {\log (\sin (a+b x))}{b}-\frac {\sin ^2(a+b x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2590
Rubi steps
\begin {align*} \int \cos ^2(a+b x) \cot (a+b x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1-x^2}{x} \, dx,x,-\sin (a+b x)\right )}{b}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{x}-x\right ) \, dx,x,-\sin (a+b x)\right )}{b}\\ &=\frac {\log (\sin (a+b x))}{b}-\frac {\sin ^2(a+b x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 27, normalized size = 1.00 \[ \frac {\log (\sin (a+b x))}{b}-\frac {\sin ^2(a+b x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 25, normalized size = 0.93 \[ \frac {\cos \left (b x + a\right )^{2} + 2 \, \log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right )}{2 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.57, size = 25, normalized size = 0.93 \[ -\frac {\sin \left (b x + a\right )^{2} - \log \left (\sin \left (b x + a\right )^{2}\right )}{2 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 26, normalized size = 0.96 \[ \frac {\cos ^{2}\left (b x +a \right )}{2 b}+\frac {\ln \left (\sin \left (b x +a \right )\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.54, size = 25, normalized size = 0.93 \[ -\frac {\sin \left (b x + a\right )^{2} - \log \left (\sin \left (b x + a\right )^{2}\right )}{2 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 35, normalized size = 1.30 \[ \frac {\frac {{\cos \left (a+b\,x\right )}^2}{2}-\frac {\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{2}+\ln \left (\mathrm {tan}\left (a+b\,x\right )\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.35, size = 369, normalized size = 13.67 \[ \begin {cases} - \frac {\log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )} \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} - \frac {2 \log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )} \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} - \frac {\log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} + \frac {\log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )} \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} + \frac {2 \log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )} \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} + \frac {\log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} - \frac {2 \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 2 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + b} & \text {for}\: b \neq 0 \\\frac {x \cos ^{3}{\relax (a )}}{\sin {\relax (a )}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________